package io.github.uicdb.et.mixin;

import io.github.uicdb.et.IDamageSourceReplacement;
import net.minecraft.core.Holder;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageType;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(DamageSource.class)
public class DamageSourceMixin implements IDamageSourceReplacement {
    @Mutable
    @Shadow
    @Final
    private  Holder<DamageType> type;

    @Override
    public void et_replaceSourceType(Holder<DamageType> damageTypeHolder) {
        type = damageTypeHolder;
    }
}
